package com.zr.model;
// Generated 2016-10-26 14:56:45 by Hibernate Tools 4.3.1.Final

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * LMdistributionRange generated by hbm2java
 * 配送范围的模型
 */
@Entity
@Table(name = "l_mdistribution_range", catalog = "logistical_managementcrm")
public class LMdistributionRange implements java.io.Serializable {

	private Integer drid;
	private LMdistribution LMdistribution;
	private String drname;
	private String drange;//配送范围
	private String dtime;//配送范围的创建时间
	private String drtemp;//备用字段
	private Set<LMdistributionPrice> LMdistributionPrices = new HashSet<LMdistributionPrice>(0);

	public LMdistributionRange() {
	}

	public LMdistributionRange(LMdistribution LMdistribution, String drname, String drange, String dtime, String drtemp,
			Set<LMdistributionPrice> LMdistributionPrices) {
		this.LMdistribution = LMdistribution;
		this.drname = drname;
		this.drange = drange;
		this.dtime = dtime;
		this.drtemp = drtemp;
		this.LMdistributionPrices = LMdistributionPrices;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "drid", unique = true, nullable = false)
	public Integer getDrid() {
		return this.drid;
	}

	public void setDrid(Integer drid) {
		this.drid = drid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "did")
	public LMdistribution getLMdistribution() {
		return this.LMdistribution;
	}

	public void setLMdistribution(LMdistribution LMdistribution) {
		this.LMdistribution = LMdistribution;
	}

	@Column(name = "drname")
	public String getDrname() {
		return this.drname;
	}

	public void setDrname(String drname) {
		this.drname = drname;
	}

	@Column(name = "drange")
	public String getDrange() {
		return this.drange;
	}

	public void setDrange(String drange) {
		this.drange = drange;
	}

	@Column(name = "dtime")
	public String getDtime() {
		return this.dtime;
	}

	public void setDtime(String dtime) {
		this.dtime = dtime;
	}

	@Column(name = "drtemp")
	public String getDrtemp() {
		return this.drtemp;
	}

	public void setDrtemp(String drtemp) {
		this.drtemp = drtemp;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "LMdistributionRange")
	public Set<LMdistributionPrice> getLMdistributionPrices() {
		return this.LMdistributionPrices;
	}

	public void setLMdistributionPrices(Set<LMdistributionPrice> LMdistributionPrices) {
		this.LMdistributionPrices = LMdistributionPrices;
	}

}
